package indi.zhifa.expshare.class001.chemicalmatch.entity.dto;

import indi.zhifa.expshare.class001.chemicalmatch.enums.EModuleType;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Data
public class NickNameDto {
    @NotNull(message = "module不能为空")
    EModuleType module;
    String subModule;
    @NotEmpty(message = "nickNames不能为空")
    List<String> nickNames;
    @NotNull(message = "name不能为空")
    String name;

    public void testAndInit(){
        if("chemical".equals(module)){
            subModule = "none";
        }
    }
}
